package pl.kosmowska.ewelina.client.app.requestfactory;

import java.util.List;

import pl.kosmowska.ewelina.client.app.requestfactory.dto.LoanDataProxy;
import pl.kosmowska.ewelina.client.app.requestfactory.dto.OutcomeDataProxy;
import pl.kosmowska.ewelina.server.dao.LoanDataDAO;
import pl.kosmowska.ewelina.server.locators.EntityServiceLocator;

import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;


@Service(value = LoanDataDAO.class, locator = EntityServiceLocator.class)
public interface LoanDataRequest extends RequestContext {

  Request<LoanDataProxy> findLoanData(String id);
  
  Request<List<LoanDataProxy>> findLoanDataByUser();
  
  Request<LoanDataProxy> persist(LoanDataProxy loanDataProxy, List <OutcomeDataProxy> outcomeList);
  
  Request<LoanDataProxy> persist(LoanDataProxy loanDataProxy);
  
  Request<Boolean> deleteLoanData(String id);
  
}
